<div class="card flex flex-col justify-between h-full mt-4">
  <div class="card-divider">
    <h2 class="card-title">
        <span class="text-black font-bold"><%= t("decidim.elections.admin.dashboard.status.title") %></span>
    </h2>
  </div>

  <div class="pb-4">
    <div class="row column">
      <div class="election-title mb-2"><%= translated_attribute election.title %></div>
      <div class="mb-2">
        <span class="font-semibold"><%= t("decidim.elections.admin.dashboard.status.census") %></span>
        <span><%= election.census&.label %></span>
      </div>
      <div class="status-label">
        <%= election_status_with_label(election) %>
        <span class="label"><%= t("decidim.elections.admin.dashboard.status.results_availability.#{election.results_availability}") %></span>
      </div>
      <% if election.scheduled? %>
        <div class="mt-4">
          <label class="flex items-center cursor-pointer">
            <%= check_box_tag "allow_census_check_before_start",
                              "1",
                              election.allow_census_check_before_start,
                              class: "census-check-toggle",
                              data: { url: Decidim::EngineRouter.admin_proxy(election.component).toggle_census_check_election_path(election) } %>
            <span class="ml-2"><%= t("decidim.elections.admin.dashboard.status.allow_census_check_before_start") %></span>
          </label>
        </div>
      <% end %>
    </div>
  </div>
</div>
